﻿using System.Linq;
using BizWeb.Models;
using System;

namespace BizWeb.Models.Interface
{

    public interface ITag
    {
        // Query Methods
        IQueryable<Site_Tag> AllTags();
        // public IQueryable - add tag weight
        Site_Tag GetTag(Guid id);


        //public IQueryable<Site_Tag> AllTagsForPost(Guid id)
        //{
        //    // TODO: Double check the following. Verify that the result set is filtered based on PostID
        //    return db.Site_Tags.Where(w => w.Site_TaggedPosts.Where(p => p.PostID = id)).OrderBy(o => o.TagName)
        //}

        // Insert/Delete
        void Add(Site_Tag tag);
        void Delete(Site_Tag tag);

        // Persistence
        void Save();
    }

}